<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=0, width=device-width"/>
	<meta content="telephone=no" name="format-detection" /> 
	<title>api</title>
	<link rel="stylesheet" type="text/css" href="../css/api.css" />
	<link rel="stylesheet" type="text/css" href="../css/common.css" />
	
	<style type="text/css">
	html body {
		background-color: #fff;
	}
	#shareDetail{
		background-color: #fff;
	}
	.acctivify-header{
			position: fixed;
			left: 0;
			right: 0;
			top: 0;
			z-index: 5;
		}
	#shareDetail .header{

		display: block;
		position: fixed;
		left: 0px;
		top: 0px;
		width: 100%;
		z-index: -1111px;
	}
	#shareDetail{
		position: relative;
	}
	#sh-content{
		
		display: block;
		position: relative;
		padding: 10px;
	}
	
	.sh-info{
		display: block;
		margin: 10px 0px;
	}
	#sh-title{
		color: #666;
		font-weight: bold;
		font-size: 14px;
	}
	.partakeDetail{
		padding: 10px;
		background-color: #f2f2f2;
	}
	.partakeDetail p{
		margin: 10px 0px;
	}
	.share-info{
		margin: 15px 0px;
	}

	#share-img{
		margin: 10px 0px;
		
    text-align: center;
    color: #666;
    font-size: 14px;
	}
	#share-img img{
		max-width: 300px;
	}
	</style>
</head>

<body>
<script id='sd-template' type="text/x-dot-template">
	<p id='sh-title'>{{=it.sd_title}}</p>
			<p class="sh-info" onclick="openWin('userCore','{{=it.sd_userid}}')">
		
				<span class="blue">{{=it.username}}</span>
				<span class="gray right">{{=it.time}}</span>
			</p>
			<div  class="partakeDetail">
				<p><span class='blue'>{{=it.title}}</span></p>
				<p>本期参与：<span class='red'>{{=it.num}}人次</span></p>
				<p>幸运号码：<span class="red">{{=it.q_user_code}}</span></p>
				<p>揭晓时间：{{=it.q_end_time}}</p>
			</div>
			<div class='share-info'>
				<p id='share-title'>
					{{=it.sd_content}}
				</p>
				{{for(var i=0; i< it.photolist.length-1; i++) { }}
				<div id='share-img'>
					<img src="http://wap.jqmao.cn/statics/uploads/{{=it.photolist[i]}}">
				</div>
				{{}}}
				
			</div>
</script>

	<div id='shareDetail'>
		
		<header  class='acctivify-header'>
						<div id='header' class='header'>
							<i id='back' onclick="back()"></i><h1>晒单详情</h1>
						</div>
		</header>
		
		<div id='sh-content' style="margin-top: 4em">
		
		</div>	
	</div>

</body>
	<script type="text/javascript" src="../script/zepto.min.js"></script>
	<script type="text/javascript" src="../script/api.js"></script>	
	<script src='../script/swipe.js'></script>
	<script type="text/javascript" src="../script/doT.min.js"></script>
	<script type="text/javascript" src="../script/common.js"></script>
	<script type="text/javascript" src="../script/shareDetail.js"></script>
	<script>
		apiready = function(){
			headerstatus();
			
			var sd_id = api.pageParam.id;
			var sid = api.pageParam.key2;
			//alert(sid);
			api.ajax({
	            url:'http://wap.jqmao.cn/shareDetail?sd_id='+sd_id+'&sid='+sid
            },function(ret,err){
            	//coding...
            	if(ret){          
            	//alert(JSON.stringify(ret))
	            	var content = $api.byId('sh-content');
		            var tpl = $api.byId('sd-template').text;
		            var tempFn = doT.template(tpl);
		            $api.html(content, tempFn(ret));
            		//alert(JSON.stringify(ret))
            	}else{
            		////alert(JSON.stringify(err))
            	}
            });
			
		}
	</script>

</html>